package com.xhwl.centiotdata.pushtrigger.alarm;

import com.xhwl.centiotdata.handler.alarm.impl.AlarmHuaWeiH3800Handler;
import com.xhwl.common.pojo.ResultJson;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author Leon
 * @Description: TODO
 * @Date: 2022/5/16 9:39
 */
@RestController
@RequestMapping("/")
@Slf4j
public class HuaweiH3800AlarmController {

    @Autowired
    AlarmHuaWeiH3800Handler alarmHuaWeiH3800Handler;

    @PostMapping("/h3800ivs/ivscallback/{rowId}")
    public ResultJson huaweiH3800AlarmReceive(@RequestBody String body, @PathVariable("rowId") Integer rowId) {
        return alarmHuaWeiH3800Handler.huaWeiH3800Receive(body, rowId);
    }

    @PostMapping("/ivs3800/intelligence-subscribe")
    public ResultJson huaweiH1800IntelligenceReceive(@RequestBody String body){
        return alarmHuaWeiH3800Handler.huaweiH3800IntelligenceReceive(body);
    }
}
